var MessagesView = function(parentElement,source){
	this.parentElement = parentElement;
	this.source = source;
	this.template = Handlebars.compile(this.source);

	return this;
};

MessagesView.prototype = {
	render : function(context,scrollable){
		this.parentElement.html(this.template(context));

		if(scrollable || scrollable == undefined){
			this.scroller = new iScroll(this.parentElement[0]);
			this.scroller.scrollTo(0,this.scroller.maxScrollY);
		}
		return this;
	}
}